package com.etc.medical.client;

import com.etc.common.utils.Result;
import com.etc.cure.entity.Operation;
import com.etc.medical.breaker.OperationBreak;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "sp-cure", fallback = OperationBreak.class)
public interface OperationClient {
    /**
     * 通过医生id获取手术列表
     *
     * @param docId
     * @return
     */
    @RequestMapping("/op/queryAllByDocId")
    Result queryAllByDocId(@RequestParam("pageNum") Integer pageNum, @RequestParam("pageSize") Integer pageSize, @RequestParam("docId") String docId);

    /**
     * 根据门诊Id查询手术信息
     *
     * @param osId
     * @return
     */
    @RequestMapping("/op/queryByOsId")
    Result queryByOsId(@RequestParam("osId") String osId);

    /**
     * 新增手术
     *
     * @param operation
     * @return
     */
    @RequestMapping(value = "/op/insert", method = RequestMethod.POST)
    Result insert(@RequestBody Operation operation, @RequestParam("operatorId") String operatorId);

    /**
     * 修改手术详情
     *
     * @param operation
     * @param operatorId
     * @return
     */
    @RequestMapping(value = "/op/update", method = RequestMethod.POST)
    Result update(@RequestBody Operation operation, @RequestParam("operatorId") String operatorId);


    /**
     * 查询职位为手术医生的所有在职医生
     */
    @RequestMapping("/op/queryOpDoc")
    Result queryOpDoc();
}
